using Microsoft.AspNetCore.Mvc;

namespace Dcy.Dapr.Cron.Controllers;

/// <summary>
/// dapr run -a dapr-cron -p 7082 -P https -H 3501 -G 35001 -- dotnet run
/// </summary>
[ApiController]
public class WeatherForecastController : ControllerBase
{
    private readonly ILogger<WeatherForecastController> _logger;

    public WeatherForecastController(ILogger<WeatherForecastController> logger)
    {
        _logger = logger;
    }

    [HttpPost]
    [Route("scheduled")]
    public IActionResult Get()
    {
        _logger.LogInformation("Getting weather forecast {date}",DateTime.Now.ToString("MM/dd/yyyy HH:mm:ss"));
        return Ok();
    }
}